<?php

namespace app\admin\model;

class RolePermission extends \app\common\model\RolePermission
{
    /**
     * 获取角色对应的权限列表
     * @param $roleId
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function getColumn($roleId)
    {
        return static::where(['role_id' => $roleId])
            ->select()
            ->column('role_id', 'permission_id');
    }
}